public class PlayerToucingWallState : PlayerState
{
    protected bool _Grabinput;
    protected bool _isGrabed;

    protected bool _isGrounded;
    protected bool _isTouchingLedge;
    protected bool _isTouchingWall;

    protected bool _Jumpinput;
    protected int _Xinput;
    protected int _Yinput;

    public PlayerToucingWallState(Player player, PlayerSM stateMachine, PlayerData playerData, string animBoolName,
        Core core) : base(player, stateMachine, playerData, animBoolName, core)
    {
    }

    public override void AnimationFinshTrigger()
    {
        base.AnimationFinshTrigger();
    }

    public override void AnimationTrigger()
    {
        base.AnimationTrigger();
    }

    public override void DoChecks()
    {
        base.DoChecks();

        _isGrounded = _core.Collision.Grounded;
        _isTouchingWall = _core.Collision.WallFront;
        _isTouchingLedge = _core.Collision.LedgeHorizontal;
    }


    public override void Enter()
    {
        base.Enter();
    }

    public override void Exit()
    {
        base.Exit();
    }

    public override void LogicUpdate()
    {
        base.LogicUpdate();

        _Xinput = LightInputManager.Instance.NormalInputX;
        _Yinput = LightInputManager.Instance.NormalInputY;
        _Grabinput = LightInputManager.Instance.GrabInput;
        _Jumpinput = LightInputManager.Instance.JumpInput;
        //if(_Grabinput) _isGrabed = true; //WARNING:������ʽ��װ��ȷ�ϲ�Ҫ������ �����������
        if (_isTouchingWall && !_isTouchingLedge)
        {
            _stateMachine.ChangeState(_player.LedgeClimbState);
        }
        else if (_Jumpinput)
        {
            _player.WallJumpState.DetermineWallJumpDirection(_isTouchingWall);
            _stateMachine.ChangeState(_player.WallJumpState);
        }
        else if (_isGrounded && !_isGrabed)
        {
            _stateMachine.ChangeState(_player.IdleState);
        }
        else if (!_isTouchingWall) //DELETE:|| _Xinput != _player.FacingDircetion
        {
            _stateMachine.ChangeState(_player.InAirState);
        }
    }

    public override void PhysicsUpdate()
    {
        base.PhysicsUpdate();
    }
}